package com.smart.manager.pop.entities.body;


import cn.hutool.core.lang.RegexPool;
import com.smart.common.entities.core.BaseSearch;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * 支付中心-支付宝配置
 *
 * @author Administrator
 * @date 2022/10/31
 */

public class RPopBasicLink {


    /**
     * 支付订单搜索条件
     *
     * @author xiaxuqiu
     * @date 2022/10/17
     */
    @Data
    @EqualsAndHashCode(callSuper = true)
    @ApiModel("RBasicPoster1")
    public static class SearchBody extends BaseSearch {
        @ApiModelProperty(value = "链接标题")
        private String title;
    }


    @Data

    @ApiModel("RBasicPoster2")
    public static class EditBody implements Serializable {

        @ApiModelProperty(value = "链接标题")
        @NotBlank(message = "链接标题 不能为空")
        @Length(max = 80  , message = "链接标题 不能超过80个字符")
        private String title;


        @ApiModelProperty(value = "链接描述")
        @NotBlank(message = "链接描述 不能为空")
        @Length(max = 200  , message = "链接描述 不能超过200个字符")
        private String description;

        @ApiModelProperty(value = "链接缩略图")
        @NotBlank(message = "链接缩略图 不能为空")
        @Pattern(regexp = RegexPool.URL_HTTP , message = "链接缩略图 不是合法的URL地址")
        private String thumb;


        @ApiModelProperty(value = "链接地址")
        @NotBlank(message = "链接地址 不能为空")
        @Pattern(regexp = RegexPool.URL_HTTP , message = "链接地址不是合法的URL地址")
        private String url;

        @ApiModelProperty(value = "链接备注")
        @Length(max = 200  , message = "链接标题 不能超过80个字符")
        private String remark;

    }


}
